# -*- coding: utf-8 -*- 
# @project : 《Atcoder》
# @Author : created by bensonrachel on 2021/11/15
# @File : 227.B - KEYENCE building.py

N = int(input())
S = list(map(int,input().split()))
for s in S:
    for b in range(1,s//4+2):
        a = (s - 3*b)/(4*b+3)
        if a.is_integer() and a >= 1:
            N = N - 1
            break
print(N)
